<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
<title>title</title>   
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">

<script type="text/javascript">
	function checkValue() {
		var title=document.getElementById("notice_title").value;
		var content=document.getElementById("notice_content").value;
		
		if(title==""){
			alert("제목을 입력하세요.");
			return;
		}else if(content==""){
			alert("내용을 입력하세요.");
			return;
		}
		document.writeForm.submit();
	}
	
	function cancelWriting() {
		if(confirm("취소하시겠습니까?"))
			history.back();
	}
</script>

</head>
<body>
<c:import url="../common/top.jsp"></c:import>
<div class="container" style="margin: 60px;"></div>

<div class="container">
<div class="row">

<div class="col-sm-1 col-md-1 col-lg-1"></div>
<!--  -->


<div class="col-sm-10 col-md-10 col-lg-10">
<c:if test="${ sessionScope.adminVo!=null }">
	<div class="col-xs-12 col-sm-12 col-md-12- col-lg-12">
		<div class="jumbotron">
			<strong>공지사항 글쓰기</strong>
		</div>
	</div>
	<div class="col-xs-12 col-sm-12 col-md-12- col-lg-12">
	<form action="/OffTheRecord/wirteNotice.action" name="writeForm">
       	제목<input type="text" class="form-control"  name="notice_title" id="notice_title">
          	내용<textarea rows="15" cols="40" class="form-control"  name="notice_content" id="notice_content"></textarea>
		<div align="center"><br>
			<input type="button" value="확인" onclick="checkValue()" class="btn btn-default btn-sm">
			<input type="button" value="취소" onclick="cancelWriting()" class="btn btn-default btn-sm">
		</div>
	</form>
	</div>
</c:if>

</div><!-- row -->
</div><!-- container -->

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</body>
</html>